package org.jeecg.modules.iot.service;


import org.jeecg.modules.iot.model.CarLocationResp;
import org.jeecg.modules.iot.model.Location;
import org.jeecg.modules.iot.model.LocationJson;

import java.sql.Timestamp;
import java.util.List;

public interface ILocationService {
    int add(Location one);

    Location queryBySeq(Integer seq, String tableName);

    Location queryByDeviceId(String deviceId);

    Location queryNearestLocationAfterTime(String deviceId, Timestamp timestamp);

    Location queryNearestLocationBeforeTime(String deviceId, Timestamp timestamp);

    List<CarLocationResp> queryNearestDevices(double currentLatitude, double currentLongitude, Integer range );

    Location queryStaticByDeviceId(String deviceId);
    Location queryMoveByDeviceId(String deviceId);

    List<LocationJson> queryLocationsByTimeRange(String deviceId, Timestamp startTime, Timestamp endTime);

    Location queryOneKmBefore(String deviceId, Float milOne);
}
